const moment = require('moment');
moment.locale("zh-cn");

module.exports =
{
  base: '/vue-press/',
  title: "皮皇的技术笔记",
  description: "记录学习中遇到的问题和知识点",
  head: [
    ['link', { rel: 'icon', href: '/favicon.ico' }],
    ['meta', { name: 'author', content: '徐宏涛' }],
    ['meta', { name: 'keywords', content: 'vuepress介绍' }],
  ],
  plugins: {
    '@vuepress/last-updated': {
      transformer: (timestamp) => moment(timestamp).format("LLLL")
    },
    '@vuepress/back-to-top': true,
    '@vuepress/google-analytics':
      {
        'ga': 'G-VBSSJ56QY4' 
      }
  },
  themeConfig: {
    lastUpdated: '更新时间',
    logo: '/assets/img/hero.png',
    nav: [
      { text: 'Home', link: '/' },
      { text: 'Guide', link: '/about' },
      {
        text: 'Languages',
        ariaLabel: 'Language Menu',
        items: [
          {
            text: 'Group1', items: [
              { text: 'Home', link: '/' },
              { text: 'Guide', link: '/about' },
            ]
          },
          {
            text: 'Group2', items: [
              { text: 'Home', link: '/' },
              { text: 'Guide', link: '/about' },
            ]
          }
        ]
      },
      { text: 'External', link: 'https://www.baidu.com' }
    ],
    sidebar: {
      '/vue-press/foo/': [
        '',     /* /foo/ */
        'one',  /* /foo/one.html */
        'two'   /* /foo/two.html */
      ],

      '/vue-press/bar/': [
        '',      /* /bar/ */
        'three', /* /bar/three.html */
        'four'   /* /bar/four.html */
      ],

      // fallback
      '/vue-press/': [
        '',        /* / */
        'contact', /* /contact.html */
        'about'    /* /about.html */
      ]
    }
  }
}